local jiajucheng = fk.CreateSkill{
    name = "ym2__jiajuncheng",
}
Fk:loadTranslationTable{
    ["ym2__jiajuncheng"] = "家具城",
    ["#ym2__jiajuncheng"] = "家具城",
    [":ym2__jiajuncheng"] = "在此区域内的角色可以发动“<a href = ':ym2__longhun&'>龙魂</a>”，但获得牌时改为置入弃牌堆。",
    ["#ym2__jiajuncheng-log"] = "%from 获得的牌改为置入弃牌堆",
}
local Al_U = require "packages/ym_Al/Al_util"
jiajucheng:addEffect(Al_U.EnterBattlefield,{
    global = true,
    can_refresh = function (self, event, target, player, data)
        return target == player and data.battle == "ym2__jiajuncheng"
    end,
    on_refresh = function (self, event, target, player, data)
        player.room:handleAddLoseSkills(player, "ym2__longhun&", nil, false, true)
    end,
})
jiajucheng:addEffect(Al_U.LeaveBattlefield,{
    global = true,
    can_refresh = function (self, event, target, player, data)
        return target == player and data.battle == "ym2__jiajuncheng"
    end,
    on_refresh = function (self, event, target, player, data)
        player.room:handleAddLoseSkills(player, "-ym2__longhun&", nil, false, true)
    end,
})
jiajucheng:addEffect(fk.BeforeCardsMove,{
    global = true,
    --is_delay_effect = true,
    --mute = true,
    can_refresh = function (self, event, target, player, data)
        for _, move in ipairs(data) do
            if move.to == player and move.toArea == Card.PlayerHand and player:getMark("@[:]Battlefield") == "ym2__jiajuncheng" then
                return true
            end
        end
    end,
    on_refresh = function (self, event, target, player, data)
        local room = player.room
        for _, move in ipairs(data) do
            if move.to == player and move.toArea == Card.PlayerHand then
                move.to = nil
                move.toArea = Card.DiscardPile
                move.moveReason = fk.ReasonPutIntoDiscardPile
                move.skillName = jiajucheng.name
                move.moveMark = nil
                move.moveVisible = true
            end
        end
        room:notifySkillInvoked(player,jiajucheng.name,"negative")
        room:sendLog({
            type = "#ym2__jiajuncheng-log",
            from = player.id,
            toast = true,
        })
        --[[if #mirror_moves > 0 then
            data = mirror_moves
            room:moveCards({ids = ids,toArea = Card.DiscardPile,moveReason = fk.ReasonPutIntoDiscardPile,moveMark = nil,moveVisible = true})
        end]]--
    end,
})
return jiajucheng